import Vue from "vue";
import App from "./App.vue";
import VueRouter from "vue-router";
import routes from "./router/index.js";

import { _http } from "./utils/http";
import _comm from "./utils/common";
import storage from "@/utils/storage";

import RouterTab from "vue-router-tab";
import "vue-router-tab/dist/lib/vue-router-tab.css";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import "./assets/css/base.scss";
import QuillEditor from "@/components/quilleditor.vue";
import "@/styles/quillEditor.scss";

const router = new VueRouter({
  mode: "hash",
  routes: routes,
});

Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.use(RouterTab);
Vue.component("quill-editor", QuillEditor);
//重写message只显示最新一个
import resetMessage from "./utils/message";
Vue.prototype.$message = resetMessage;

Vue.prototype._http = _http; //api调用方式
Vue.prototype._comm = _comm; //公共方法使用
Vue.prototype._storage = storage;

Vue.config.productionTip = false;

new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
